<!DOCTYPE html>
<html>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>基础知识</title>
	<link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css"" rel="stylesheet">
    <link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
	<link href="../css/polygon.css" rel="stylesheet">
	<link href="https://cdn.bootcdn.net/ajax/libs/animate.css/3.2.3/animate.css" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="./css/border.css"/>
	<link rel="stylesheet" type="text/css" href="../../static/css/public.css" />
</head>
<body>
	<!-- 回到顶部 -->
	<div class="topBtn">
		<a href="#top">
			<i class="fa fa-long-arrow-up"></i>
		</a>
	</div>
	<!--右边内容-->
	<div id="app" class="main">
		<div class="shadow">
			<div class="Table">
				<div class="TableRow" v-for="(el,index) in list" v-cloak>
					<a class="RowLeft" :href="'#'+el.id">{{el.name}}</a>
					<span class="RowRight">{{el.explain}}</span>
				</div>
			</div>
			<div>
				<h4>改变光标位置</h4>
				<pre>
	function placeCaretAtEnd(el) { //传入光标要去的jq节点对象
	　　el.focus();
	　　if (typeof window.getSelection != "undefined" && typeof document.createRange != "undefined") {
	　　　　var range = document.createRange();
	　　　　range.selectNodeContents(el);
	　　　　range.collapse(false);
	　　　　var sel = window.getSelection();
	　　　　sel.removeAllRanges();
	　　　　sel.addRange(range);
	　　} else if (typeof document.body.createTextRange != "undefined") {
	　　　　var textRange = document.body.createTextRange();
	　　　　textRange.moveToElementText(el);
	　　　　textRange.collapse(false);
	　　　　textRange.select();
	　　}
	}
				</pre>
			</div>
		</div>
	</div>
	<!--页面加载进度条-->
	<script src="https://cdn.bootcdn.net/ajax/libs/pace/0.5.0/pace.min.js"></script>
	<!--定义数据-->
	<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.5.17/vue.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		var app = new Vue({
			el: "#app",
			data: function () {
				return {
					list:[
						{name:"改变光标位置",id:"filter",explain:''},
					]
				}
			},
		})
	</script>
</body>

</html>